Fix missing (transfer) annotations in GDK
authorMilan Bouchet-Valat <nalimilan@club.fr>
Wed, 24 Nov 2010 19:13:09 +0000 (20:13 +0100)
committerMilan Bouchet-Valat <nalimilan@club.fr>
Wed, 24 Nov 2010 20:37:20 +0000 (21:37 +0100)
Mostly missing (transfer none).

18 files changed:
gdk/gdk.c
gdk/gdkdevice.c
gdk/gdkdevicemanager.c
gdk/gdkdisplay.c
gdk/gdkevents.c
gdk/gdkkeys.c
gdk/gdkoffscreenwindow.c
gdk/gdkpango.c
gdk/gdkselection.c
gdk/gdkwindow.c
gdk/x11/gdkcursor-x11.c
gdk/x11/gdkdisplay-x11.c
gdk/x11/gdkdnd-x11.c
gdk/x11/gdkkeys-x11.c
gdk/x11/gdkscreen-x11.c
gdk/x11/gdkselection-x11.c
gdk/x11/gdkwindow-x11.c
gdk/x11/gdkxid.c

index f0ff4336eb82ce2a474483a28e504987573c7132..003ad3484757731b635fcc59942a935de3ac3662 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -316,8 +316,8 @@ gdk_get_display_arg_name (void)
  * display has previously been set, simply returns that. An internal
  * function that should not be used by applications.
  * 
- * Return value: the default display, if it could be opened,
- *   otherwise %NULL.
+ * Return value: (transfer none): the default display, if it could be
+ *   opened, otherwise %NULL.
  **/
 GdkDisplay *
 gdk_display_open_default_libgtk_only (void)
index c8e37795f01811f370e61440d74c627f46586f8e..afe8b94ce7c1dbf4b71262419ec523fbe5185b92 100644 (file)
@@ -745,8 +745,8 @@ gdk_device_set_axis_use (GdkDevice   *device,
  *
  * Returns the #GdkDisplay to which @device pertains.
  *
- * Returns: a #GdkDisplay. This memory is owned by GTK+,
- *          and must not be freed or unreffed.
+ * Returns: (transfer none): a #GdkDisplay. This memory is owned
+ *          by GTK+, and must not be freed or unreffed.
  *
  * Since: 3.0
  **/
@@ -776,7 +776,7 @@ gdk_device_get_display (GdkDevice *device)
  * If @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be
  * returned, as there is no associated device.
  *
- * Returns: The associated device, or %NULL
+ * Returns: (transfer none): The associated device, or %NULL
  *
  * Since: 3.0
  **/
index 2edaa287059e00c62571a456ed3a73423cc4dec7..56499bcb64a3db8cc8a504af9ec6bbdb4fb8ce57 100644 (file)
@@ -260,8 +260,9 @@ gdk_device_manager_get_property (GObject      *object,
  *
  * Gets the #GdkDisplay associated to @device_manager.
  *
- * Returns: the #GdkDisplay to which @device_manager is
- *          associated to, or #NULL.
+ * Returns: (transfer none): the #GdkDisplay to which @device_manager is
+ *          associated to, or #NULL. This memory is owned by GDK and
+ *          must not be freed or unreferenced.
  *
  * Since: 3.0
  **/
@@ -312,7 +313,8 @@ gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
  * You should use this function sheldomly, only in code that isn't triggered by a #GdkEvent
  * and there aren't other means to get a meaningful #GdkDevice to operate on.
  *
- * Returns: The client pointer.
+ * Returns: (transfer none): The client pointer. This memory is
+ *          owned by GDK and must not be freed or unreferenced.
  *
  * Since: 3.0
  **/
index 69d8c6a501b6274bdb69e82498b7305934e21875..564d4b5ca561b8d961c497911f0991e8147bcef5 100644 (file)
@@ -654,8 +654,8 @@ gdk_event_send_clientmessage_toall (GdkEvent *event)
  * 
  * Returns the core pointer device for the default display.
  * 
- * Return value: the core pointer device; this is owned by the
- *   display and should not be freed.
+ * Return value: (transfer none): the core pointer device; this is owned
+ *   by the display and should not be freed.
  *
  * Deprecated: 3.0: Use gdk_device_manager_get_client_pointer() instead, or
  *             gdk_event_get_device() if a #GdkEvent with pointer device
@@ -673,7 +673,7 @@ gdk_device_get_core_pointer (void)
  * 
  * Returns the core pointer device for the given display
  * 
- * Return value: the core pointer device; this is owned by the
+ * Return value: (transfer none): the core pointer device; this is owned by the
  *   display and should not be freed.
  *
  * Since: 2.2
@@ -810,7 +810,7 @@ gdk_display_get_device_state (GdkDisplay       *display,
  * Obtains the window underneath @device, returning the location of the device in @win_x and @win_y. Returns
  * %NULL if the window tree under @device is not known to GDK (for example, belongs to another application).
  *
- * Returns: the #GdkWindow under the device position, or %NULL.
+ * Returns: (transfer none): the #GdkWindow under the device position, or %NULL.
  *
  * Since: 3.0
  **/
@@ -846,7 +846,7 @@ gdk_display_get_window_at_device_position (GdkDisplay *display,
  * #GdkDevice on a particular #GdkDisplay. This is only useful for such low-level tools as
  * an event recorder. Applications should never have any reason to use this facility.
  *
- * Returns: The previous device hook table.
+ * Returns: (transfer none): The previous device hook table.
  *
  * Since: 3.0
  **/
@@ -1067,7 +1067,7 @@ multihead_default_window_at_pointer (GdkDisplay *display,
  * event recorder. Applications should never have any
  * reason to use this facility.
  *
- * Return value: the previous pointer hook table
+ * Return value: (transfer none): the previous pointer hook table
  *
  * Since: 2.2
  *
@@ -1853,7 +1853,7 @@ gdk_display_device_is_grabbed (GdkDisplay *display,
  *
  * Returns the #GdkDeviceManager associated to @display.
  *
- * Returns: A #GdkDeviceManager, or %NULL. This memory is
+ * Returns: (transfer none): A #GdkDeviceManager, or %NULL. This memory is
  *          owned by GDK and must not be freed or unreferenced.
  *
  * Since: 3.0
index 8b402fc84c5694cd45535ca8f4c9508b9398188e..d60f3b16f96f9e4a5b5d9bc70dec79eb36a84991 100644 (file)
@@ -1277,7 +1277,7 @@ gdk_event_set_screen (GdkEvent  *event,
  * to which <literal>event->motion.x_root</literal> and
  * <literal>event->motion.y_root</literal> are relative.
  * 
- * Return value: the screen for the event
+ * Return value: (transfer none): the screen for the event
  *
  * Since: 2.2
  **/
index e72b8eab9884b3dfc7151e3f495fa0b02a8c890c..102b6f08e077daf635cb9af7539a6fd547e80bc8 100644 (file)
@@ -412,7 +412,7 @@ gdk_keyval_is_lower (guint keyval)
  *
  * Returns the #GdkKeymap attached to the default display.
  *
- * Returns: the #GdkKeymap attached to the default display.
+ * Returns: (transfer none): the #GdkKeymap attached to the default display.
  */
 GdkKeymap*
 gdk_keymap_get_default (void)
index f9be9ad6c9f079ef911510da8f4a290991eda94b..f7c071b16c3950b69ebe34d7a6b457fc19a0f623 100644 (file)
@@ -703,8 +703,8 @@ gdk_offscreen_window_set_embedder (GdkWindow     *window,
  *
  * Gets the window that @window is embedded in.
  *
- * Returns: the embedding #GdkWindow, or %NULL if @window is not an
- *     embedded offscreen window
+ * Returns: (transfer none): the embedding #GdkWindow, or %NULL
+ *     if @window is not an mbedded offscreen window
  *
  * Since: 2.18
  */
index e21175bd9ac99b8ecd57a92a664da9c8000de97c..907b51798be769e237ea83909dc303b2530e498b 100644 (file)
@@ -317,7 +317,7 @@ gdk_pango_layout_get_clip_region (PangoLayout *layout,
  * is more convenient if you want to keep a context around and track
  * changes to the screen's font rendering settings.
  *
- * Return value: a new #PangoContext for the default display
+ * Return value: (transfer full): a new #PangoContext for the default display
  **/
 PangoContext *
 gdk_pango_context_get (void)
@@ -343,7 +343,7 @@ gdk_pango_context_get (void)
  * is more convenient if you want to keep a context around and track
  * changes to the screen's font rendering settings.
  * 
- * Return value: a new #PangoContext for @screen
+ * Return value: (transfer full): a new #PangoContext for @screen
  *
  * Since: 2.2
  **/
index 0a4b428e40d81b7e3af68c5f6db60d56cd3cb29b..9468604fe61f4e6e40615b23282f31ba169d8adb 100644 (file)
@@ -97,9 +97,9 @@ gdk_selection_owner_set (GdkWindow *owner,
  *
  * Determines the owner of the given selection.
  *
- * Returns: if there is a selection owner for this window,
- *   and it is a window known to the current process,
- *   the #GdkWindow that owns the selection, otherwise
+ * Returns: (transfer none): if there is a selection owner for
+ *   this window, and it is a window known to the current
+ *   process, the #GdkWindow that owns the selection, otherwise
  *   %NULL. Note that the return value may be owned
  *   by a different process if a foreign window
  *   was previously created for that window, but
index 62644365d1e6331bb2f8e5b078b638ca84c5a6e5..dca9df1fd32597e508c215a62d658058b9e820e6 100644 (file)
@@ -2212,7 +2212,7 @@ gdk_window_get_window_type (GdkWindow *window)
  * 
  * Gets the #GdkVisual describing the pixel format of @window.
  * 
- * Return value: a #GdkVisual
+ * Return value: (transfer none): a #GdkVisual
  *
  * Since: 2.24
  **/
@@ -2234,7 +2234,7 @@ gdk_window_get_visual (GdkWindow *window)
  * 
  * Gets the #GdkScreen associated with a #GdkWindow.
  * 
- * Return value: the #GdkScreen associated with @window
+ * Return value: (transfer none): the #GdkScreen associated with @window
  *
  * Since: 2.24
  **/
@@ -2256,7 +2256,7 @@ gdk_window_get_screen (GdkWindow *window)
  * 
  * Gets the #GdkDisplay associated with a #GdkWindow.
  * 
- * Return value: the #GdkDisplay associated with @window
+ * Return value: (transfer none): the #GdkDisplay associated with @window
  *
  * Since: 2.24
  **/
@@ -5130,7 +5130,7 @@ gdk_window_at_pointer (gint *win_x,
  * Obtains the root window (parent all other windows are inside)
  * for the default display and screen.
  *
- * Return value: the default root window
+ * Return value: (transfer none): the default root window
  **/
 GdkWindow *
 gdk_get_default_root_window (void)
@@ -5148,8 +5148,8 @@ gdk_get_default_root_window (void)
  * For example in the X backend, a native window handle is an Xlib
  * <type>XID</type>.
  *
- * Return value: the newly-created #GdkWindow wrapper for the
- *    native window or %NULL if the window has been destroyed.
+ * Return value: (transfer full): the newly-created #GdkWindow wrapper
+ *    for the native window, or %NULL if the window has been destroyed.
  **/
 GdkWindow *
 gdk_window_foreign_new (GdkNativeWindow anid)
index b01325b2329a7aac3f51be39b349a1066718f7f8..60380672c2c415401a14b62116f612e88797bf73 100644 (file)
@@ -362,7 +362,7 @@ gdk_x11_cursor_get_xcursor (GdkCursor *cursor)
  *
  * Returns the display on which the #GdkCursor is defined.
  *
- * Returns: the #GdkDisplay associated to @cursor
+ * Returns: (transfer none): the #GdkDisplay associated to @cursor
  *
  * Since: 2.2
  */
@@ -387,7 +387,7 @@ gdk_cursor_get_display (GdkCursor *cursor)
  * on the cursor, GDK may not be able to obtain the image data. In this 
  * case, %NULL is returned.
  *
- * Returns: a #GdkPixbuf representing @cursor, or %NULL
+ * Returns: (transfer full): a #GdkPixbuf representing @cursor, or %NULL
  *
  * Since: 2.8
  */
index 148d167d4397412bcf2ee9fe0051ee55c8c20df1..0ced13753b22d6484e67ca4a0864ac0c813ea73c 100644 (file)
@@ -1187,11 +1187,12 @@ _gdk_input_init (GdkDisplay *display)
 /**
  * gdk_display_open:
  * @display_name: the name of the display to open
- * @returns: a #GdkDisplay, or %NULL if the display
- *  could not be opened.
  *
  * Opens a display.
  *
+ * Return value: (transfer none): a #GdkDisplay, or %NULL if the display
+ *               could not be opened.
+ *
  * Since: 2.2
  */
 GdkDisplay *
@@ -1581,7 +1582,7 @@ gdk_display_get_n_screens (GdkDisplay *display)
  *
  * Returns a screen object for one of the screens of the display.
  *
- * Returns: the #GdkScreen object
+ * Returns: (transfer none): the #GdkScreen object
  *
  * Since: 2.2
  */
@@ -1601,7 +1602,7 @@ gdk_display_get_screen (GdkDisplay *display,
  *
  * Get the default #GdkScreen for @display.
  * 
- * Returns: the default #GdkScreen object for @display
+ * Returns: (transfer none): the default #GdkScreen object for @display
  *
  * Since: 2.2
  */
@@ -1771,7 +1772,8 @@ gdk_display_flush (GdkDisplay *display)
  * on @display. This window is implicitly created by GDK. 
  * See gdk_window_set_group().
  * 
- * Return value: The default group leader window for @display
+ * Return value: (transfer none): The default group leader window
+ * for @display
  *
  * Since: 2.4
  **/
@@ -1935,7 +1937,7 @@ gdk_display_x11_finalize (GObject *object)
  * 
  * Find the #GdkDisplay corresponding to @display, if any exists.
  * 
- * Return value: the #GdkDisplay, if found, otherwise %NULL.
+ * Return value: (transfer none): the #GdkDisplay, if found, otherwise %NULL.
  *
  * Since: 2.2
  **/
index 74e874b078f9b56bbf2187ce6f3b252e762392fb..e4d8cffc914819d4d8138459ccdf1bbd1a10e58e 100644 (file)
@@ -257,7 +257,7 @@ gdk_drag_context_set_device (GdkDragContext *context,
  *
  * Returns the #GdkDevice associated to the drag context.
  *
- * Returns: The #GdkDevice associated to @context.
+ * Returns: (transfer none): The #GdkDevice associated to @context.
  **/
 GdkDevice *
 gdk_drag_context_get_device (GdkDragContext *context)
@@ -3162,7 +3162,7 @@ gdk_drag_do_leave (GdkDragContext *context, guint32 time)
  *
  * This function is called by the drag source.
  * 
- * Return value: a newly created #GdkDragContext.
+ * Return value: (transfer full): a newly created #GdkDragContext.
  **/
 GdkDragContext * 
 gdk_drag_begin (GdkWindow     *window,
index cb09d1f32891457f9497844dfe8531675a2f81d0..20bb6ee4ef48a89c90c4aabc17eda33fab1fd4c0 100644 (file)
@@ -289,10 +289,11 @@ get_xkb (GdkKeymapX11 *keymap_x11)
 /** 
  * gdk_keymap_get_for_display:
  * @display: the #GdkDisplay.
- * @returns: the #GdkKeymap attached to @display.
  *
  * Returns the #GdkKeymap attached to @display.
  *
+ * Return value: (transfer none): the #GdkKeymap attached to @display.
+ *
  * Since: 2.2
  **/
 GdkKeymap*
index 8fb9ffc333b9b6c89ace57788d4e2997bd1b6f99..90d35dc5d82dbabae2172e94a0dc18ee1468216b 100644 (file)
@@ -117,7 +117,7 @@ _gdk_screen_x11_init (GdkScreenX11 *screen)
  *
  * Gets the display to which the @screen belongs.
  * 
- * Returns: the display to which @screen belongs
+ * Returns: (transfer none): the display to which @screen belongs
  *
  * Since: 2.2
  **/
@@ -1229,7 +1229,7 @@ gdk_screen_make_display_name (GdkScreen *screen)
 }
 
 /**
- * gdk_screen_get_active_window
+ * gdk_screen_get_active_window:
  * @screen: a #GdkScreen
  *
  * Returns the screen's currently active window.
@@ -1247,7 +1247,7 @@ gdk_screen_make_display_name (GdkScreen *screen)
  * The returned window should be unrefed using g_object_unref() when
  * no longer needed.
  *
- * Return value: the currently active window, or %NULL.
+ * Return value: (transfer full): the currently active window, or %NULL.
  *
  * Since: 2.10
  **/
index 03ec39670ecece04ba300f6c096aa54f669c7123..41be49ed93c5ec53e5170ccd266d0ce82da0d18b 100644 (file)
@@ -197,9 +197,9 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
  * process if a foreign window was previously created for that
  * window, but a new foreign window will never be created by this call. 
  *
- * Returns: if there is a selection owner for this window, and it is a 
- *    window known to the current process, the #GdkWindow that owns the 
- *    selection, otherwise %NULL.
+ * Returns: (transfer none): if there is a selection owner for this window,
+ *    and it is a window known to the current process, the #GdkWindow that
+ *    owns the selection, otherwise %NULL.
  *
  * Since: 2.2
  */ 
index b369e2c63e209aa0201ed414988077014109fb6c..ec9071077e94524cb95458202e5c92033aa4ed36 100644 (file)
@@ -841,9 +841,9 @@ x_event_mask_to_gdk_event_mask (long mask)
  * For example in the X backend, a native window handle is an Xlib
  * <type>XID</type>.
  * 
- * Return value: a #GdkWindow wrapper for the native window or 
- *   %NULL if the window has been destroyed. The wrapper will be
- *   newly created, if one doesn't exist already.
+ * Return value: (transfer full): a #GdkWindow wrapper for the native
+ *   window, or %NULL if the window has been destroyed. The wrapper
+ *   will be newly created, if one doesn't exist already.
  *
  * Since: 2.2
  **/
@@ -945,8 +945,8 @@ gdk_window_foreign_new_for_display (GdkDisplay     *display,
  * For example in the X backend, a native window handle is an Xlib
  * <type>XID</type>.
  *
- * Return value: the #GdkWindow wrapper for the native window, 
- *    or %NULL if there is none.
+ * Return value: (transfer none): the #GdkWindow wrapper for the native
+ *    window, or %NULL if there is none.
  *
  * Since: 2.2
  **/
@@ -965,8 +965,8 @@ gdk_window_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid)
  * For example in the X backend, a native window handle is an Xlib
  * <type>XID</type>.
  *
- * Return value: the #GdkWindow wrapper for the native window, 
- *    or %NULL if there is none.
+ * Return value: (transfer none): the #GdkWindow wrapper for the native
+ *    window, or %NULL if there is none.
  **/
 GdkWindow *
 gdk_window_lookup (GdkNativeWindow anid)
index 94649b9ae1a755682d1f4b235074e8128711b27d..52b86c9e64fa90628d08b6f5138e610434e2e8c7 100644 (file)
@@ -80,8 +80,8 @@ _gdk_xid_table_remove (GdkDisplay *display,
  *
  * Returns the GDK object associated with the given X id.
  *
- * Return value: the associated #GdkWindow or %NULL if no
- *     object is associated with the X id.
+ * Return value: (transfer none): the associated #GdkWindow, or %NULL
+ *     of no object is associated with the X id.
  *
  * Since: 2.2
  */
@@ -110,8 +110,8 @@ gdk_xid_table_lookup_for_display (GdkDisplay  *display,
  * Returns the Gdk object associated with the given X id for the default
  * display.
  *
- * Return value: the associated #GdkWindow or %NULL if no
- *     object is associated with the X id.
+ * Return value: (transfer none): the associated #GdkWindow, or %NULL
+ *     if no object is associated with the X id.
  */
 gpointer
 gdk_xid_table_lookup (XID xid)